import { useState, useEffect } from "react";
import { Form } from "antd";
import { CommonModal } from "@/views/components/CommonModal";
import { SimpleTable } from "@/views/components/SearchTable/index";
import { useTableConfig } from "@/views/components/SearchTable/hooks/useTableConfig";
const OrderDetailModal = ({ visible, handleCancel }) => {
	const [form] = Form.useForm();
	const [loading, setLoading] = useState(false);
	const tableRequest = getFindSupplierNumPage;

	useEffect(() => {}, [visible]);
	const columns = [
		{
			name: "图片",
			code: "storeName"
		},
		{
			name: "商品信息",
			code: "storeName"
		},
		{
			name: "数量",
			code: "storeName"
		},
		{
			name: "已分拣数",
			code: "storeName"
		},
		{
			name: "商品唯一码",
			code: "storeName"
		},
		,
		{
			name: "分拣状态",
			code: "storeName"
		}
	];

	const tableKey = "SplitOrderModal23131";
	const { searchSimpleTableProps } = useTableConfig({
		tableKey,
		rowKey: "id",
		columns,
		tableRequest,
		autoFetch: true,
		hasPagination: true,
		hasQuickSearch: true,
		beforeQuerySearch: false,
		columnResize: true,
		resetSourceData: false,
		hasColsSetting: true
	});
	const onCancel = () => {
		handleCancel();
		form.resetFields();
	};

	return (
		<CommonModal title={{ title: "订单详情" }} visible={true} width={"800px"} onCancel={onCancel} minHeight="150px">
			<div>仓库订单号：W202307101452756458339</div>
			<SimpleTable key={tableKey} {...searchSimpleTableProps} />
		</CommonModal>
	);
};

export default OrderDetailModal;
